package com.xinchao.dao;

import com.xinchao.model.DeviceSetting;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface DeviceSettingMapper {

	/**
	 * 更新终端设置信息
	 * @param setting DeviceSetting
	 * @param deviceCodes 终端编码列表
	 */
	void updateDeviceSetting(@Param("setting") DeviceSetting setting, @Param("deviceCodes") List<String> deviceCodes);

	/**
	 * 根据mac查询终端设置信息
	 * @param deviceMac
	 * @return
	 */
	DeviceSetting getDeviceSetting(@Param("deviceMac") String deviceMac, @Param("companyCode") String companyCode);

	/**
	 * 根据升级配置id查询是否有升级设置信息
	 * @param softwareUpgradeId
	 * @param firmwareUpgradeId
	 * @return
	 */
    int countSettingByUpgradeId(@Param("softwareUpgradeId") Integer softwareUpgradeId,@Param("firmwareUpgradeId") Integer firmwareUpgradeId);
}